From cb6bdaa39f01eaf73e70aa403934027a979feb09 Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Fri, 2 Dec 2005 22:15:58 +0100 Subject: [PATCH] Fix vif-net script for setups where eth0 has no IP address. Use the IP address associated with the backend network interface for connections from dom0 to the guest connected to this network interface. Signed-off-by: Christian Limpach --- tools/examples/vif-nat | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/examples/vif-nat b/tools/examples/vif-nat index b2bfade528..d667fb89da 100644 --- a/tools/examples/vif-nat +++ b/tools/examples/vif-nat @@ -91,8 +91,6 @@ vif_int=$(( $(echo "((($vif_ip" | sed -e 's#\.#)\*256\+#g') )) netmask=$(dotted_quad $intmask) network=$(dotted_quad $(( $vif_int & $intmask )) ) -main_ip=$(dom0_ip) - dhcp_remove_entry() { @@ -140,7 +138,7 @@ case "$command" in do_or_die ip link set "$vif" up arp on do_or_die ip addr add "$router_ip" dev "$vif" - do_or_die ip route add "$vif_ip" dev "$vif" src "$main_ip" + do_or_die ip route add "$vif_ip" dev "$vif" src "$router_ip" echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp [ "$dhcp" != 'no' ] && dhcp_up ;; -- 2.30.2